package com.lkm.market2_0.m.dataUp;

import com.lkm.market2_0.ExpandConfig;
import com.lkm.market2_0.entity.SteelyardInfo;
import com.lkm.market2_0.m.steelyarddata.OrderEntity;

public class DataUpFace {

    private static DataUpModule dataUpModule = null;


    public static void updateStatus(SteelyardInfo steelyardInfo,  boolean isExceptions) {
        if (dataUpModule == null&&loadCount<10) {
            loadCount++;
            dataUpModule = (DataUpModule) ExpandConfig.instance.getModuleManager().peekModule(DataUpModule.class);
        }
        if (dataUpModule == null) return;

        dataUpModule.upState(steelyardInfo, isExceptions);

    }
      static int loadCount = 0;
    public static void submitWeightInfo(SteelyardInfo steelyardInfo, OrderEntity orderEntity) {
        if (dataUpModule == null&&loadCount<10) {
            loadCount++;
            dataUpModule = (DataUpModule) ExpandConfig.instance.getModuleManager().peekModule(DataUpModule.class);
        }

        if (dataUpModule == null) return;

        dataUpModule.submitWeightInfo(  steelyardInfo,   orderEntity) ;
    }
}
